home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / DATACH.CST / 00205_Script_popUpMenucharts < prev    next >
Text File  |  1999-03-07  |  2KB  |  67 lines

  1. property thePopLocc, popSpritec, popNamec, mySpritec, faraway, fieldObjc
  2. global currentChartName, popbgSpritec
  3.  
  4. on new me
  5.   set mySpritec = the spriteNum of me
  6.   set popSpritec = mySpritec + 1
  7.   set popbgSpritec = mySpritec - 3
  8.   set right = the right of sprite (mySpritec - 2)
  9.   set top = the top of sprite (mySpritec -2)
  10.   set thePopLocc = point(right, top)
  11.   set popNamec = "chart_field"
  12.   
  13.   puppetSprite popSpritec, true  
  14.   set faraway = point(-1000, -1000)
  15.   set the loc of sprite popSpritec = faraway
  16.   
  17.   return me
  18. end
  19.  
  20. on register me, theObj
  21.   set fieldObjc = theObj
  22. end 
  23.  
  24. global paramchartredraw
  25.  
  26. on mouseDown me
  27.   set the member of sprite popSpritec = member popNamec
  28.   set the loc of sprite popSpritec = thePopLocc
  29.   set the member of sprite popbgSpritec = member popNamec
  30.   set the loc of sprite popbgSpritec = thePopLocc
  31.   -- put "popped - " & thepoplocc
  32.   updateStage
  33.   repeat while the stillDown
  34.     checkIfInsidec fieldObjc
  35.   end repeat
  36.   
  37.   
  38.   set name = getPlaneNamec(fieldObjc)
  39.   if name = "" then 
  40.     nothing
  41.   else
  42.     --    put "got -"& name
  43.     set the loc of sprite popSpritec = faraway
  44.     set the loc of sprite popbgSpritec = faraway
  45.     set currentchartname = name
  46.     go to "chartblank"
  47.     updatestage
  48.     go to "chartback"
  49.     updatestage
  50.     set paramchartredraw = 0
  51.     set the text of member "disPlane" = "No Competitor"
  52.     setupchart
  53.     --    disSpecs name
  54.   end if
  55.   
  56.   
  57.   set the loc of sprite popSpritec = faraway
  58.   set the loc of sprite popbgSpritec = faraway
  59.   
  60.   updateStage
  61. end
  62.  
  63. on mouseUp me
  64.   
  65.   nothing
  66. end 
  67.